package com.gitee.springioc.practice;

import com.gitee.springioc.practice.service.PartnerInfoService;
import com.gitee.springioc.practice.service.impl.PartnerRegistServiceImpl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringiocPracticeApplication {

    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(SpringiocPracticeApplication.class, args);
        PartnerInfoService partnerService;
        for (int i = 0; i < 10; i++) {
            partnerService = (PartnerInfoService) applicationContext.getBean(PartnerRegistServiceImpl.PARTNER_SERVICE_PREFIX + "2018" + i);
            System.out.println("开始循环第" + i + "个service");
            System.out.println(partnerService.getLimitAmount());
            System.out.println(partnerService.getPartnerName());
            System.out.println(partnerService.getPartnerNo());
            System.out.println(partnerService.getRsaKey());
            System.out.println("结束循环第" + i + "个service");
        }
    }
}
